export const listOption = {
  border: true,
  stripe: true,
  menuAlign: "center",
  index: true,
  searchSpan: 7,
  editBtn: false,
  indexLabel: "序号",
  labelWidth: "100",
  searchMenuSpan: 6,
  align: "center",
  column: [{
      label: "文章标题",
      prop: "title",
      search: true,
      span: 24,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
    {
      label: "所属栏目",
      span: 24,
      type: "select",
      dicFlag: true,
      dicUrl: process.env.VUE_APP_BASE_API + "/admin/news/cateAll",
      dicFormatter: res => {
        return (res.data || []).map(o => ({
          label: o.name,
          value: o.id
        }));
      },
      props: {
        label: "label",
        value: "value"
      },
      rules: [{
        required: true,
        message: "请输入"
      }],
      prop: "cate_id"
    },
    {
      label: "缩略图",
      prop: 'thumb',
      type: 'upload',
      action: process.env.VUE_APP_BASE_API + '/admin/upload/newsThumb',
      loadText: '附件上传中，请稍等',
      listType: 'picture-img',
      tip: "推荐200*200，1M之内",
      propsHttp: {
        res: 'data',
      },
      span: 24
    },
    // {
    //   label: "简介",
    //   prop: "description",
    //   type: 'textarea',
    //   span: 24,
    //   rules: [{
    //     required: true,
    //     message: "请输入"
    //   }]
    // },
    {
      label: "内容",
      prop: "content",
      span: 24,
      formslot: true,
      hide: true,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
    {
      label: "点击次数",
      prop: "read",
      span: 24,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
    {
      label: "创建时间",
      prop: "create_time",
      addDisplay: false,
      editDisplay: false,
      span: 24,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
  ]
};

export const cateOption = {
  border: true,
  stripe: true,
  menuAlign: "center",
  searchSpan: 7,
  labelWidth: "100",
  viewBtn: true,
  searchMenuSpan: 6,
  align: "center",
  column: [{
      label: "栏目ID",
      prop: "id",
      span: 24,
      addDisplay: false,
      editDisplay: false,
    },
    {
      label: "栏目标题",
      prop: "name",
      span: 24,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
    {
      label: "创建时间",
      prop: "create_time",
      addDisplay: false,
      editDisplay: false,
      span: 24,
      rules: [{
        required: true,
        message: "请输入"
      }]
    },
  ]
};
